"""字典学习

"""


def print_dict(dictDemo={}):
    """ 打印dict

    使用items()进行打印
    :param dictDemo:待打印的字典
    :return:
    """
    for k, v in dictDemo.items():
        print("{} : {}".format(k, v))


def print_dict2(dictDemo={}):
    """ 打印dict

    使用keys()进行打印
    :param dictDemo:
    :return:
    """
    for k in dictDemo.keys():
        print("{} : {}".format(k, dictDemo[k]))

if __name__ == "__main__":
    dict1 = {'dxlau': 110, 'zwp': 111}
    # dict2 = dict([('dxlau', 110), ('zwp', 111)])
    print_dict2(dict1)
